﻿namespace HRM.CORE.Process
{
    using DevExpress.Utils;
    using DevExpress.XtraBars;
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraEditors.Repository;
    using DevExpress.XtraGrid;
    using DevExpress.XtraGrid.Columns;
    using DevExpress.XtraGrid.Menu;
    using DevExpress.XtraGrid.Views.Base;
    using DevExpress.XtraGrid.Views.Grid;
    using DevExpress.XtraGrid.Views.Grid.ViewInfo;
    using Microsoft.VisualBasic;
    using APP.HELPER;
    using Common.Class; using APP.HELPER.Utils.Language; using Security.Security; using Dictionary.ERP;
    using Common.Report;
    using HRM.CORE;
    using HRM.CORE.REPORT;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms; using Common;
    using Common;
    using Extra.ERP;
    using Security.ERP;

    public class xucListDiscipline : Common.xucBase
    {
        private Bar bar1;
        private BarDockControl barDockControlBottom;
        private BarDockControl barDockControlLeft;
        private BarDockControl barDockControlRight;
        private BarDockControl barDockControlTop;
        private BarManager barManager1;
        private BarEditItem bbeBeginDate;
        private BarEditItem bbeEndDate;
        private BarButtonItem bbiAddEmployee;
        private BarButtonItem bbiClose;
        private BarButtonItem bbiDelete;
        private BarButtonItem bbiEdit;
        private BarButtonItem bbiExport;
        private BarEditItem bbiFilter;
        private BarButtonItem bbiPrint;
        private BarButtonItem bbiRefresh;
        private GridColumn colDate;
        private GridColumn colDateOccured;
        private GridColumn colDepartmentName;
        private GridColumn colDescription;
        private GridColumn colDisciplineID;
        private GridColumn colDisciplineName;
        private GridColumn colEmployeeCode;
        private GridColumn colFirstName;
        private GridColumn colForm;
        private GridColumn colGroupName;
        private GridColumn colLastName;
        private GridColumn colLocation;
        private GridColumn colPerson;
        private GridColumn colWitnesses;
        private IContainer components = null;
        private GridView gbList;
        private GridControl gcList;
        private GridColumn gridColumn1;
        private GridColumn gridColumn10;
        private GridColumn gridColumn11;
        private GridColumn gridColumn12;
        private GridColumn gridColumn13;
        private GridColumn gridColumn14;
        private GridColumn gridColumn15;
        private GridColumn gridColumn16;
        private GridColumn gridColumn17;
        private GridColumn gridColumn18;
        private GridColumn gridColumn19;
        private GridColumn gridColumn2;
        private GridColumn gridColumn20;
        private GridColumn gridColumn3;
        private GridColumn gridColumn4;
        private GridColumn gridColumn5;
        private GridColumn gridColumn6;
        private GridColumn gridColumn7;
        private GridColumn gridColumn8;
        private GridColumn gridColumn9;
        public DevExpress.Utils.ImageCollection imageCollection2;
        private DevExpress.Utils.ImageCollection imgList;
        private int m_IndexKey = 1;
        private RepositoryItemDateEdit repBeginDate;
        private RepositoryItemDateEdit repEndDate;
        private RepositoryItemTimeEdit repMonth;
        private RepositoryItemImageComboBox repositoryItemImageComboBox1;
        private RepositoryItemTimeEdit repYear;
        private RepositoryItemPictureEdit rptPhoto;

        public event ClosedHander Closed;

        public xucListDiscipline()
        {
            this.InitializeComponent();
            this.InitData();
            this.ReLoad();
        }

        private void Add()
        {
            if (MyRule.IsAdd("bbiProcessDiscipline"))
            {
                xfmDisciplineAdd add = new xfmDisciplineAdd(Actions.Add, "");
                add.Added += new xfmDisciplineAdd.AddedEventHander(this.frm_Added);
                add.ShowDialog();
            }
        }

        private void AddRow(HRM_PROCESS_DISCIPLINE item)
        {
            GridView gbList = this.gbList;
            int focusedRowHandle = gbList.FocusedRowHandle;
            gbList.AddNewRow();
            focusedRowHandle = gbList.FocusedRowHandle;
            gbList.SetRowCellValue(focusedRowHandle, "DisciplineID", item.DisciplineID);
            gbList.SetRowCellValue(focusedRowHandle, "EmployeeCode", item.EmployeeCode);
            HRM_EMPLOYEE hrm_employee = new HRM_EMPLOYEE();
            hrm_employee.Get(item.EmployeeCode);
            gbList.SetRowCellValue(focusedRowHandle, "DepartmentName", hrm_employee.DepartmentName);
            gbList.SetRowCellValue(focusedRowHandle, "GroupName", hrm_employee.GroupName);
            gbList.SetRowCellValue(focusedRowHandle, "FirstName", hrm_employee.FirstName);
            gbList.SetRowCellValue(focusedRowHandle, "LastName", hrm_employee.LastName);
            gbList.SetRowCellValue(focusedRowHandle, "DisciplineName", item.DisciplineName);
            gbList.SetRowCellValue(focusedRowHandle, "DateOccured", item.DateOccurred);
            gbList.SetRowCellValue(focusedRowHandle, "Location", item.Location);
            gbList.SetRowCellValue(focusedRowHandle, "Description", item.Description);
            gbList.SetRowCellValue(focusedRowHandle, "Witnesses", item.Witnesses);
            gbList.SetRowCellValue(focusedRowHandle, "Form", item.Form);
            gbList.SetRowCellValue(focusedRowHandle, "Date", item.Date);
            gbList.SetRowCellValue(focusedRowHandle, "Person", item.Person);
            gbList.UpdateCurrentRow();
        }

        private void bbiAddWork_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.Add();
        }

        private void bbiClose_ItemClick(object sender, ItemClickEventArgs e)
        {
            base.ParentForm.Close();
        }

        private void bbiDelete_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (MyRule.IsDelete("bbiProcessDiscipline"))
            {
                bool flag = false;
                int[] selectedRows = this.gbList.GetSelectedRows();
                if (XtraMessageBox.Show("Bạn c\x00f3 muốn x\x00f3a kh\x00f4ng?", "Th\x00f4ng b\x00e1o", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.No)
                {
                    string str;
                    object rowCellValue;
                    base.SetWaitDialogCaption("Đang x\x00f3a...");
                    HRM_PROCESS_DISCIPLINE hrm_process_discipline = new HRM_PROCESS_DISCIPLINE();
                    for (int i = selectedRows.Length; i > 0; i--)
                    {
                        flag = true;
                        rowCellValue = this.gbList.GetRowCellValue(selectedRows[i - 1], "DisciplineID");
                        if (rowCellValue != null)
                        {
                            SYS_LOG.Insert("Qu\x00e1 Tr\x00ecnh Kỷ Luật", "Xo\x00e1", rowCellValue.ToString());
                            str = hrm_process_discipline.Delete(new Guid(rowCellValue.ToString()));
                            if (str == "OK")
                            {
                                this.gbList.DeleteRow(selectedRows[i - 1]);
                            }
                            else if (str != "OK")
                            {
                                MessageBox.Show("Th\x00f4ng tin kh\x00f4ng được x\x00f3a" + str, "Th\x00f4ng b\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                            }
                        }
                    }
                    this.DoHide();
                    if (!flag)
                    {
                        rowCellValue = this.gbList.GetFocusedRowCellValue("DisciplineID");
                        if (rowCellValue != null)
                        {
                            SYS_LOG.Insert("Qu\x00e1 Tr\x00ecnh Kỷ Luật", "Xo\x00e1", rowCellValue.ToString());
                            base.SetWaitDialogCaption("Đang x\x00f3a...");
                            str = hrm_process_discipline.Delete(new Guid(rowCellValue.ToString()));
                            if (str == "OK")
                            {
                                this.gbList.DeleteRow(this.gbList.FocusedRowHandle);
                            }
                            else if (str != "OK")
                            {
                                MessageBox.Show("Th\x00f4ng tin kh\x00f4ng được x\x00f3a\r\n" + str, "Th\x00f4ng b\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                            }
                            this.DoHide();
                        }
                    }
                }
            }
        }

        private void bbiEdit_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.Change();
        }

        private void bbiExport_ItemClick(object sender, ItemClickEventArgs e)
        {
            base._exportView = this.gbList;
            SYS_LOG.Insert("Qu\x00e1 Tr\x00ecnh Kỷ Luật", "Xuất");
            base.Export();
        }

        private void bbiFilter_EditValueChanged(object sender, EventArgs e)
        {
            this.m_IndexKey = int.Parse(this.bbiFilter.EditValue.ToString());
            if (this.m_IndexKey == 0)
            {
                this.bbeBeginDate.Enabled = false;
                this.bbeEndDate.Enabled = false;
            }
            else
            {
                this.bbeBeginDate.Enabled = true;
                this.bbeEndDate.Enabled = true;
            }
            this.LoadGrid();
        }

        private void bbiPrint_ItemClick(object sender, ItemClickEventArgs e)
        {
            rptListDiscipline discipline;
            SYS_LOG.Insert("Qu\x00e1 Tr\x00ecnh Kỷ Luật", "In");
            xfmReport report = new xfmReport();
            report.SetTitle("Sổ Theo D\x00f5i Kỷ Luật");
            if (this.m_IndexKey == 0)
            {
                discipline = new rptListDiscipline();
            }
            else
            {
                discipline = new rptListDiscipline(System.DateTime.Parse(this.bbeBeginDate.EditValue.ToString()), System.DateTime.Parse(this.bbeEndDate.EditValue.ToString()));
            }
            report.ShowPrintPreview(discipline);
        }

        private void bbiRefresh_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.ReLoad();
        }

        private void Change()
        {
            if (MyRule.IsAccess("bbiProcessDiscipline"))
            {
                HRM_PROCESS_DISCIPLINE item = new HRM_PROCESS_DISCIPLINE();
                object focusedRowCellValue = this.gbList.GetFocusedRowCellValue("DisciplineID");
                if (focusedRowCellValue != null)
                {
                    base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
                    if (item.Get(new Guid(focusedRowCellValue.ToString())) != "OK")
                    {
                        this.DoHide();
                        XtraMessageBox.Show("Dữ liệu kh\x00f4ng tồn tại", "Th\x00f4ng B\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                    else
                    {
                        this.DoHide();
                        xfmDisciplineAdd add = new xfmDisciplineAdd(Actions.Update, item);
                        add.Updated += new xfmDisciplineAdd.UpdatedEventHander(this.frm_Updated);
                        add.Added += new xfmDisciplineAdd.AddedEventHander(this.frm_Added);
                        add.ShowDialog();
                    }
                }
            }
        }

        public void DisableMenu(bool disable)
        {
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        protected void DoShowMenu(GridHitInfo hi)
        {
            if (hi.HitTest == GridHitTest.ColumnButton)
            {
                GridViewMenu menu = new GridViewColumnButtonMenu(this.gbList);
                menu.Init(hi);
                menu.Show(hi.HitPoint);
            }
        }

        private void frm_Added(object sender, HRM_PROCESS_DISCIPLINE Item)
        {
            this.AddRow(Item);
        }

        private void frm_Updated(object sender, HRM_PROCESS_DISCIPLINE Item)
        {
            this.UpdateRow(Item);
        }

        private void gbList_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
        {
            if (e.RowHandle == -2147483648)
            {
                e.Handled = true;
                e.Painter.DrawObject(e.Info);
                Rectangle bounds = e.Bounds;
                e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(0x3f, 0xa5, 0xa5, 0)), bounds);
                bounds.Height--;
                bounds.Width--;
                e.Graphics.DrawRectangle(Pens.Blue, bounds);
            }
            int rowHandle = e.RowHandle;
            if (rowHandle >= 0)
            {
                rowHandle++;
                e.Info.DisplayText = rowHandle.ToString();
            }
        }

        private void gbList_DoubleClick(object sender, EventArgs e)
        {
            if (this.gbList.RowCount != 0)
            {
                this.Change();
            }
        }

        private void gbList_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e)
        {
        }

        private void gbList_KeyDown(object sender, KeyEventArgs e)
        {
            this.ucList_ListKeyDown(sender, e);
            if ((e.KeyCode == Keys.Delete) && (this.gbList.RowCount != 0))
            {
                this.Delete();
                this.SetMenu(null);
            }
        }

        private void gbList_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                this.DoShowMenu(this.gbList.CalcHitInfo(new Point(e.X, e.Y)));
            }
            this.SetMenu(null);
        }

        private void gbList_RowCellClick(object sender, RowCellClickEventArgs e)
        {
            Common.Class.RowClickEventArgs args = new Common.Class.RowClickEventArgs(e.RowHandle, e.Column.ColumnHandle);
            this.SetMenu(args);
        }

        private void InitData()
        {
            System.DateTime now;
            try
            {
                now = DateAndTime.DateAdd(DateInterval.Month, -6.0, System.DateTime.Now);
            }
            catch
            {
                now = System.DateTime.Now;
            }
            this.bbeBeginDate.EditValue = now;
            this.bbeEndDate.EditValue = DateAndTime.DateAdd(DateInterval.Day, 1.0, System.DateTime.Today);
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(xucListDiscipline));
            this.gcList = new GridControl();
            this.gbList = new GridView();
            this.colDisciplineID = new GridColumn();
            this.colDepartmentName = new GridColumn();
            this.colGroupName = new GridColumn();
            this.colEmployeeCode = new GridColumn();
            this.colFirstName = new GridColumn();
            this.colLastName = new GridColumn();
            this.colDisciplineName = new GridColumn();
            this.colDateOccured = new GridColumn();
            this.colLocation = new GridColumn();
            this.colDescription = new GridColumn();
            this.colWitnesses = new GridColumn();
            this.colForm = new GridColumn();
            this.colPerson = new GridColumn();
            this.colDate = new GridColumn();
            this.rptPhoto = new RepositoryItemPictureEdit();
            this.gridColumn1 = new GridColumn();
            this.gridColumn2 = new GridColumn();
            this.gridColumn3 = new GridColumn();
            this.gridColumn4 = new GridColumn();
            this.gridColumn5 = new GridColumn();
            this.gridColumn6 = new GridColumn();
            this.gridColumn7 = new GridColumn();
            this.gridColumn8 = new GridColumn();
            this.gridColumn9 = new GridColumn();
            this.gridColumn10 = new GridColumn();
            this.gridColumn11 = new GridColumn();
            this.gridColumn12 = new GridColumn();
            this.gridColumn13 = new GridColumn();
            this.gridColumn14 = new GridColumn();
            this.gridColumn15 = new GridColumn();
            this.gridColumn16 = new GridColumn();
            this.gridColumn17 = new GridColumn();
            this.gridColumn18 = new GridColumn();
            this.gridColumn19 = new GridColumn();
            this.gridColumn20 = new GridColumn();
            this.barManager1 = new BarManager(this.components);
            this.bar1 = new Bar();
            this.bbiAddEmployee = new BarButtonItem();
            this.bbiEdit = new BarButtonItem();
            this.bbiDelete = new BarButtonItem();
            this.bbiFilter = new BarEditItem();
            this.repositoryItemImageComboBox1 = new RepositoryItemImageComboBox();
            this.bbeBeginDate = new BarEditItem();
            this.repBeginDate = new RepositoryItemDateEdit();
            this.bbeEndDate = new BarEditItem();
            this.repEndDate = new RepositoryItemDateEdit();
            this.bbiPrint = new BarButtonItem();
            this.bbiExport = new BarButtonItem();
            this.bbiRefresh = new BarButtonItem();
            this.bbiClose = new BarButtonItem();
            this.barDockControlTop = new BarDockControl();
            this.barDockControlBottom = new BarDockControl();
            this.barDockControlLeft = new BarDockControl();
            this.barDockControlRight = new BarDockControl();
            this.imageCollection2 = new DevExpress.Utils.ImageCollection(this.components);
            this.repMonth = new RepositoryItemTimeEdit();
            this.repYear = new RepositoryItemTimeEdit();
            this.imgList = new DevExpress.Utils.ImageCollection(this.components);
            this.gcList.BeginInit();
            this.gbList.BeginInit();
            this.rptPhoto.BeginInit();
            this.barManager1.BeginInit();
            this.repositoryItemImageComboBox1.BeginInit();
            this.repBeginDate.BeginInit();
            this.repBeginDate.VistaTimeProperties.BeginInit();
            this.repEndDate.BeginInit();
            this.repEndDate.VistaTimeProperties.BeginInit();
            this.imageCollection2.BeginInit();
            this.repMonth.BeginInit();
            this.repYear.BeginInit();
            this.imgList.BeginInit();
            base.SuspendLayout();
            this.gcList.Dock = DockStyle.Fill;
            this.gcList.EmbeddedNavigator.Buttons.Append.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Edit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.EndEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Remove.Visible = false;
            this.gcList.EmbeddedNavigator.TextStringFormat = "{0}/{1}";
            this.gcList.Location = new Point(0, 0x1a);
            this.gcList.MainView = this.gbList;
            this.gcList.Name = "gcList";
            this.gcList.RepositoryItems.AddRange(new RepositoryItem[] { this.rptPhoto });
            this.gcList.Size = new Size(0x4ab, 0x255);
            this.gcList.TabIndex = 3;
            this.gcList.UseEmbeddedNavigator = true;
            this.gcList.ViewCollection.AddRange(new BaseView[] { this.gbList });
            this.gbList.Appearance.GroupRow.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.gbList.Appearance.GroupRow.Options.UseFont = true;
            this.gbList.Appearance.HeaderPanel.Options.UseTextOptions = true;
            this.gbList.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center;
            this.gbList.Appearance.HeaderPanel.TextOptions.WordWrap = WordWrap.Wrap;
            this.gbList.BorderStyle = BorderStyles.NoBorder;
            this.gbList.ColumnPanelRowHeight = 0x20;
            this.gbList.Columns.AddRange(new GridColumn[] { this.colDisciplineID, this.colDepartmentName, this.colGroupName, this.colEmployeeCode, this.colFirstName, this.colLastName, this.colDisciplineName, this.colDateOccured, this.colLocation, this.colDescription, this.colWitnesses, this.colForm, this.colPerson, this.colDate });
            this.gbList.FixedLineWidth = 1;
            this.gbList.FocusRectStyle = DrawFocusRectStyle.RowFocus;
            this.gbList.GridControl = this.gcList;
            this.gbList.GroupPanelText = "K\x00e9o v\x00e0 thả cột v\x00e0o đ\x00e2y để nh\x00f3m dữ liệu";
            this.gbList.IndicatorWidth = 40;
            this.gbList.Name = "gbList";
            this.gbList.OptionsBehavior.AllowIncrementalSearch = true;
            this.gbList.OptionsBehavior.AutoExpandAllGroups = true;
            this.gbList.OptionsBehavior.CopyToClipboardWithColumnHeaders = false;
            this.gbList.OptionsBehavior.FocusLeaveOnTab = true;
            this.gbList.OptionsLayout.StoreAllOptions = true;
            this.gbList.OptionsLayout.StoreAppearance = true;
            this.gbList.OptionsMenu.EnableColumnMenu = false;
            this.gbList.OptionsMenu.EnableGroupPanelMenu = false;
            this.gbList.OptionsNavigation.EnterMoveNextColumn = true;
            this.gbList.OptionsSelection.InvertSelection = true;
            this.gbList.OptionsSelection.MultiSelect = true;
            this.gbList.OptionsView.ColumnAutoWidth = false;
            this.gbList.OptionsView.EnableAppearanceEvenRow = true;
            this.gbList.OptionsView.RowAutoHeight = true;
            this.gbList.OptionsView.ShowAutoFilterRow = true;
            this.gbList.FocusedRowChanged += new FocusedRowChangedEventHandler(this.gbList_FocusedRowChanged);
            this.gbList.CustomDrawRowIndicator += new RowIndicatorCustomDrawEventHandler(this.gbList_CustomDrawRowIndicator);
            this.gbList.KeyDown += new KeyEventHandler(this.gbList_KeyDown);
            this.gbList.MouseDown += new MouseEventHandler(this.gbList_MouseDown);
            this.gbList.DoubleClick += new EventHandler(this.gbList_DoubleClick);
            this.gbList.RowCellClick += new RowCellClickEventHandler(this.gbList_RowCellClick);
            this.colDisciplineID.Caption = "DisciplineID";
            this.colDisciplineID.FieldName = "DisciplineID";
            this.colDisciplineID.Name = "colDisciplineID";
            this.colDepartmentName.Caption = "Ph\x00f2ng ban";
            this.colDepartmentName.FieldName = "DepartmentName";
            this.colDepartmentName.Name = "colDepartmentName";
            this.colDepartmentName.Width = 0x84;
            this.colGroupName.Caption = "Tổ nh\x00f3m";
            this.colGroupName.FieldName = "GroupName";
            this.colGroupName.Name = "colGroupName";
            this.colEmployeeCode.Caption = "M\x00e3 NV";
            this.colEmployeeCode.FieldName = "EmployeeCode";
            this.colEmployeeCode.Name = "colEmployeeCode";
            this.colEmployeeCode.OptionsColumn.AllowEdit = false;
            this.colEmployeeCode.OptionsColumn.ReadOnly = true;
            this.colEmployeeCode.Visible = true;
            this.colEmployeeCode.VisibleIndex = 0;
            this.colEmployeeCode.Width = 70;
            this.colFirstName.Caption = "Họ l\x00f3t";
            this.colFirstName.FieldName = "FirstName";
            this.colFirstName.Name = "colFirstName";
            this.colFirstName.OptionsColumn.AllowEdit = false;
            this.colFirstName.OptionsColumn.ReadOnly = true;
            this.colFirstName.Visible = true;
            this.colFirstName.VisibleIndex = 1;
            this.colFirstName.Width = 0x67;
            this.colLastName.Caption = "T\x00ean";
            this.colLastName.FieldName = "LastName";
            this.colLastName.Name = "colLastName";
            this.colLastName.OptionsColumn.AllowEdit = false;
            this.colLastName.OptionsColumn.ReadOnly = true;
            this.colLastName.Visible = true;
            this.colLastName.VisibleIndex = 2;
            this.colLastName.Width = 0x42;
            this.colDisciplineName.Caption = "Kỷ luật về việc";
            this.colDisciplineName.FieldName = "DisciplineName";
            this.colDisciplineName.Name = "colDisciplineName";
            this.colDisciplineName.OptionsColumn.AllowEdit = false;
            this.colDisciplineName.OptionsColumn.ReadOnly = true;
            this.colDisciplineName.Visible = true;
            this.colDisciplineName.VisibleIndex = 3;
            this.colDisciplineName.Width = 0x105;
            this.colDateOccured.Caption = "Thời gian xảy ra";
            this.colDateOccured.FieldName = "DateOccured";
            this.colDateOccured.Name = "colDateOccured";
            this.colDateOccured.OptionsColumn.AllowEdit = false;
            this.colDateOccured.OptionsColumn.ReadOnly = true;
            this.colDateOccured.Visible = true;
            this.colDateOccured.VisibleIndex = 4;
            this.colDateOccured.Width = 0x47;
            this.colLocation.Caption = "Địa điểm xảy ra";
            this.colLocation.FieldName = "Location";
            this.colLocation.Name = "colLocation";
            this.colLocation.OptionsColumn.AllowEdit = false;
            this.colLocation.OptionsColumn.ReadOnly = true;
            this.colLocation.Visible = true;
            this.colLocation.VisibleIndex = 5;
            this.colLocation.Width = 0x68;
            this.colDescription.AppearanceCell.Options.UseTextOptions = true;
            this.colDescription.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDescription.Caption = "M\x00f4 tả";
            this.colDescription.FieldName = "Description";
            this.colDescription.Name = "colDescription";
            this.colDescription.OptionsColumn.AllowEdit = false;
            this.colDescription.OptionsColumn.ReadOnly = true;
            this.colDescription.Visible = true;
            this.colDescription.VisibleIndex = 6;
            this.colDescription.Width = 0x109;
            this.colWitnesses.Caption = "Người chứng kiến";
            this.colWitnesses.FieldName = "Witnesses";
            this.colWitnesses.Name = "colWitnesses";
            this.colWitnesses.OptionsColumn.AllowEdit = false;
            this.colWitnesses.OptionsColumn.ReadOnly = true;
            this.colWitnesses.Visible = true;
            this.colWitnesses.VisibleIndex = 7;
            this.colWitnesses.Width = 0x72;
            this.colForm.Caption = "H\x00ecnh thức kỷ luật";
            this.colForm.FieldName = "Form";
            this.colForm.Name = "colForm";
            this.colForm.OptionsColumn.AllowEdit = false;
            this.colForm.OptionsColumn.ReadOnly = true;
            this.colForm.Visible = true;
            this.colForm.VisibleIndex = 8;
            this.colForm.Width = 0x6b;
            this.colPerson.AppearanceCell.Options.UseTextOptions = true;
            this.colPerson.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colPerson.Caption = "Người ra quyết định";
            this.colPerson.FieldName = "Person";
            this.colPerson.Name = "colPerson";
            this.colPerson.OptionsColumn.AllowEdit = false;
            this.colPerson.OptionsColumn.ReadOnly = true;
            this.colPerson.Visible = true;
            this.colPerson.VisibleIndex = 9;
            this.colPerson.Width = 0x62;
            this.colDate.Caption = "Ng\x00e0y quyết định";
            this.colDate.FieldName = "Date";
            this.colDate.Name = "colDate";
            this.colDate.OptionsColumn.AllowEdit = false;
            this.colDate.OptionsColumn.ReadOnly = true;
            this.colDate.Visible = true;
            this.colDate.VisibleIndex = 10;
            this.colDate.Width = 0x4f;
            this.rptPhoto.CustomHeight = 0x30;
            this.rptPhoto.Name = "rptPhoto";
            this.rptPhoto.NullText = "[Chưa chọn h\x00ecnh]";
            this.rptPhoto.SizeMode = PictureSizeMode.Zoom;
            this.gridColumn1.Caption = "Chi nh\x00e1nh";
            this.gridColumn1.FieldName = "BranchName";
            this.gridColumn1.Name = "gridColumn1";
            this.gridColumn1.Visible = true;
            this.gridColumn1.VisibleIndex = 0;
            this.gridColumn2.Caption = "Ph\x00f2ng ban";
            this.gridColumn2.FieldName = "DepartmentName";
            this.gridColumn2.Name = "gridColumn2";
            this.gridColumn2.Visible = true;
            this.gridColumn2.VisibleIndex = 1;
            this.gridColumn3.Caption = "Tổ nh\x00f3m";
            this.gridColumn3.FieldName = "GroupName";
            this.gridColumn3.Name = "gridColumn3";
            this.gridColumn3.Visible = true;
            this.gridColumn3.VisibleIndex = 2;
            this.gridColumn4.Caption = "H\x00ecnh ảnh";
            this.gridColumn4.ColumnEdit = this.rptPhoto;
            this.gridColumn4.FieldName = "Photo";
            this.gridColumn4.Fixed = FixedStyle.Left;
            this.gridColumn4.Name = "gridColumn4";
            this.gridColumn4.OptionsColumn.AllowEdit = false;
            this.gridColumn4.OptionsColumn.ReadOnly = true;
            this.gridColumn4.Visible = true;
            this.gridColumn4.VisibleIndex = 3;
            this.gridColumn5.Caption = "M\x00e3 nh\x00e2n vi\x00ean";
            this.gridColumn5.FieldName = "EmployeeCode";
            this.gridColumn5.Fixed = FixedStyle.Left;
            this.gridColumn5.Name = "gridColumn5";
            this.gridColumn5.OptionsColumn.AllowEdit = false;
            this.gridColumn5.OptionsColumn.ReadOnly = true;
            this.gridColumn5.Visible = true;
            this.gridColumn5.VisibleIndex = 4;
            this.gridColumn5.Width = 0x4a;
            this.gridColumn6.Caption = "Họ l\x00f3t";
            this.gridColumn6.FieldName = "FirstName";
            this.gridColumn6.Fixed = FixedStyle.Left;
            this.gridColumn6.Name = "gridColumn6";
            this.gridColumn6.OptionsColumn.AllowEdit = false;
            this.gridColumn6.OptionsColumn.ReadOnly = true;
            this.gridColumn6.Visible = true;
            this.gridColumn6.VisibleIndex = 5;
            this.gridColumn6.Width = 110;
            this.gridColumn7.Caption = "T\x00ean";
            this.gridColumn7.FieldName = "LastName";
            this.gridColumn7.Fixed = FixedStyle.Left;
            this.gridColumn7.Name = "gridColumn7";
            this.gridColumn7.OptionsColumn.AllowEdit = false;
            this.gridColumn7.OptionsColumn.ReadOnly = true;
            this.gridColumn7.Visible = true;
            this.gridColumn7.VisibleIndex = 6;
            this.gridColumn7.Width = 0x42;
            this.gridColumn8.Caption = "Giới t\x00ednh";
            this.gridColumn8.FieldName = "Sex";
            this.gridColumn8.Name = "gridColumn8";
            this.gridColumn8.OptionsColumn.AllowEdit = false;
            this.gridColumn8.OptionsColumn.ReadOnly = true;
            this.gridColumn8.Visible = true;
            this.gridColumn8.VisibleIndex = 7;
            this.gridColumn8.Width = 0x38;
            this.gridColumn9.Caption = "Ng\x00e0y sinh";
            this.gridColumn9.FieldName = "Birthday";
            this.gridColumn9.Name = "gridColumn9";
            this.gridColumn9.OptionsColumn.AllowEdit = false;
            this.gridColumn9.OptionsColumn.ReadOnly = true;
            this.gridColumn9.Visible = true;
            this.gridColumn9.VisibleIndex = 8;
            this.gridColumn9.Width = 0x42;
            this.gridColumn10.Caption = "Nơi sinh";
            this.gridColumn10.FieldName = "BirthPlace";
            this.gridColumn10.Name = "gridColumn10";
            this.gridColumn10.OptionsColumn.AllowEdit = false;
            this.gridColumn10.OptionsColumn.ReadOnly = true;
            this.gridColumn10.Visible = true;
            this.gridColumn10.VisibleIndex = 9;
            this.gridColumn10.Width = 0x6f;
            this.gridColumn11.Caption = "Điện thoại";
            this.gridColumn11.FieldName = "CellPhone";
            this.gridColumn11.Name = "gridColumn11";
            this.gridColumn11.OptionsColumn.AllowEdit = false;
            this.gridColumn11.OptionsColumn.ReadOnly = true;
            this.gridColumn11.Visible = true;
            this.gridColumn11.VisibleIndex = 10;
            this.gridColumn11.Width = 0x53;
            this.gridColumn12.Caption = "Địa chỉ";
            this.gridColumn12.FieldName = "MainAddress";
            this.gridColumn12.Name = "gridColumn12";
            this.gridColumn12.OptionsColumn.AllowEdit = false;
            this.gridColumn12.OptionsColumn.ReadOnly = true;
            this.gridColumn12.Visible = true;
            this.gridColumn12.VisibleIndex = 11;
            this.gridColumn12.Width = 0x13f;
            this.gridColumn13.Caption = "Chức vụ";
            this.gridColumn13.FieldName = "Position";
            this.gridColumn13.Name = "gridColumn13";
            this.gridColumn13.OptionsColumn.AllowEdit = false;
            this.gridColumn13.Visible = true;
            this.gridColumn13.VisibleIndex = 12;
            this.gridColumn13.Width = 0x8b;
            this.gridColumn14.Caption = "CMND";
            this.gridColumn14.FieldName = "IDCard";
            this.gridColumn14.Name = "gridColumn14";
            this.gridColumn14.OptionsColumn.AllowEdit = false;
            this.gridColumn14.OptionsColumn.ReadOnly = true;
            this.gridColumn14.Visible = true;
            this.gridColumn14.VisibleIndex = 13;
            this.gridColumn14.Width = 0x54;
            this.gridColumn15.Caption = "Ng\x00e0y cấp";
            this.gridColumn15.FieldName = "IDCardDate";
            this.gridColumn15.Name = "gridColumn15";
            this.gridColumn15.OptionsColumn.AllowEdit = false;
            this.gridColumn15.OptionsColumn.ReadOnly = true;
            this.gridColumn15.Visible = true;
            this.gridColumn15.VisibleIndex = 14;
            this.gridColumn16.Caption = "Nơi cấp";
            this.gridColumn16.FieldName = "IDCardPlace";
            this.gridColumn16.Name = "gridColumn16";
            this.gridColumn16.OptionsColumn.AllowEdit = false;
            this.gridColumn16.OptionsColumn.ReadOnly = true;
            this.gridColumn16.Visible = true;
            this.gridColumn16.VisibleIndex = 15;
            this.gridColumn16.Width = 0x73;
            this.gridColumn17.Caption = "Trạng th\x00e1i";
            this.gridColumn17.FieldName = "Status";
            this.gridColumn17.Name = "gridColumn17";
            this.gridColumn17.OptionsColumn.AllowEdit = false;
            this.gridColumn17.OptionsColumn.ReadOnly = true;
            this.gridColumn17.Visible = true;
            this.gridColumn17.VisibleIndex = 0x10;
            this.gridColumn18.Caption = "Ng\x00e0y BD thử việc";
            this.gridColumn18.FieldName = "TestFromDate";
            this.gridColumn18.Name = "gridColumn18";
            this.gridColumn18.OptionsColumn.AllowEdit = false;
            this.gridColumn18.OptionsColumn.ReadOnly = true;
            this.gridColumn18.Visible = true;
            this.gridColumn18.VisibleIndex = 0x11;
            this.gridColumn19.Caption = "Ng\x00e0y KT thử việc";
            this.gridColumn19.FieldName = "TestToDate";
            this.gridColumn19.Name = "gridColumn19";
            this.gridColumn19.OptionsColumn.AllowEdit = false;
            this.gridColumn19.OptionsColumn.ReadOnly = true;
            this.gridColumn19.Visible = true;
            this.gridColumn19.VisibleIndex = 0x12;
            this.gridColumn20.Caption = "Ng\x00e0y nghỉ";
            this.gridColumn20.FieldName = "EndDate";
            this.gridColumn20.Name = "gridColumn20";
            this.gridColumn20.OptionsColumn.AllowEdit = false;
            this.gridColumn20.OptionsColumn.ReadOnly = true;
            this.gridColumn20.Visible = true;
            this.gridColumn20.VisibleIndex = 0x13;
            this.barManager1.Bars.AddRange(new Bar[] { this.bar1 });
            this.barManager1.DockControls.Add(this.barDockControlTop);
            this.barManager1.DockControls.Add(this.barDockControlBottom);
            this.barManager1.DockControls.Add(this.barDockControlLeft);
            this.barManager1.DockControls.Add(this.barDockControlRight);
            this.barManager1.Form = this;
            this.barManager1.Images = this.imageCollection2;
            this.barManager1.Items.AddRange(new BarItem[] { this.bbiAddEmployee, this.bbiEdit, this.bbiDelete, this.bbiPrint, this.bbiRefresh, this.bbiClose, this.bbiExport, this.bbiFilter, this.bbeBeginDate, this.bbeEndDate });
            this.barManager1.MaxItemId = 0x22;
            this.barManager1.RepositoryItems.AddRange(new RepositoryItem[] { this.repositoryItemImageComboBox1, this.repBeginDate, this.repEndDate, this.repMonth, this.repYear });
            this.bar1.BarName = "Tools";
            this.bar1.DockCol = 0;
            this.bar1.DockRow = 0;
            this.bar1.DockStyle = BarDockStyle.Top;
            this.bar1.LinksPersistInfo.AddRange(new LinkPersistInfo[] { new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiAddEmployee, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiEdit, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiDelete, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiFilter, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeBeginDate, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeEndDate, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiPrint, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiExport, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiRefresh, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiClose, BarItemPaintStyle.CaptionGlyph) });
            this.bar1.OptionsBar.UseWholeRow = true;
            this.bar1.Text = "Tools";
            this.bbiAddEmployee.Caption = "Th\x00eam Kỷ Luật";
            this.bbiAddEmployee.Id = 3;
            this.bbiAddEmployee.ImageIndex = 0x42;
            this.bbiAddEmployee.Name = "bbiAddEmployee";
            this.bbiAddEmployee.ItemClick += new ItemClickEventHandler(this.bbiAddWork_ItemClick);
            this.bbiEdit.Caption = "Sửa";
            this.bbiEdit.Id = 4;
            this.bbiEdit.ImageIndex = 14;
            this.bbiEdit.Name = "bbiEdit";
            this.bbiEdit.ItemClick += new ItemClickEventHandler(this.bbiEdit_ItemClick);
            this.bbiDelete.Caption = "X\x00f3a";
            this.bbiDelete.Id = 5;
            this.bbiDelete.ImageIndex = 13;
            this.bbiDelete.Name = "bbiDelete";
            this.bbiDelete.ItemClick += new ItemClickEventHandler(this.bbiDelete_ItemClick);
            this.bbiFilter.Caption = "Lọc:";
            this.bbiFilter.Edit = this.repositoryItemImageComboBox1;
            this.bbiFilter.Id = 10;
            this.bbiFilter.Name = "bbiFilter";
            this.bbiFilter.Width = 120;
            this.repositoryItemImageComboBox1.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repositoryItemImageComboBox1.Appearance.Options.UseFont = true;
            this.repositoryItemImageComboBox1.AutoHeight = false;
            this.repositoryItemImageComboBox1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repositoryItemImageComboBox1.Items.AddRange(new ImageComboBoxItem[] { new ImageComboBoxItem("<Tất cả>", 0, -1), new ImageComboBoxItem("<Theo thời gian>", 1, -1) });
            this.repositoryItemImageComboBox1.Name = "repositoryItemImageComboBox1";
            this.bbeBeginDate.Caption = "Từ ng\x00e0y:";
            this.bbeBeginDate.Edit = this.repBeginDate;
            this.bbeBeginDate.Id = 30;
            this.bbeBeginDate.Name = "bbeBeginDate";
            this.bbeBeginDate.Width = 80;
            this.repBeginDate.AutoHeight = false;
            this.repBeginDate.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repBeginDate.Name = "repBeginDate";
            this.repBeginDate.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.bbeEndDate.Caption = "Đến ng\x00e0y:";
            this.bbeEndDate.Edit = this.repEndDate;
            this.bbeEndDate.Id = 0x1f;
            this.bbeEndDate.Name = "bbeEndDate";
            this.bbeEndDate.Width = 80;
            this.repEndDate.AutoHeight = false;
            this.repEndDate.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repEndDate.Name = "repEndDate";
            this.repEndDate.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.bbiPrint.Caption = "In";
            this.bbiPrint.Id = 6;
            this.bbiPrint.ImageIndex = 9;
            this.bbiPrint.Name = "bbiPrint";
            this.bbiPrint.ItemClick += new ItemClickEventHandler(this.bbiPrint_ItemClick);
            this.bbiExport.Caption = "Xuất";
            this.bbiExport.Id = 9;
            this.bbiExport.ImageIndex = 0x31;
            this.bbiExport.Name = "bbiExport";
            this.bbiExport.ItemClick += new ItemClickEventHandler(this.bbiExport_ItemClick);
            this.bbiRefresh.Caption = "Nạp Lại";
            this.bbiRefresh.Id = 7;
            this.bbiRefresh.ImageIndex = 0x2a;
            this.bbiRefresh.Name = "bbiRefresh";
            this.bbiRefresh.ItemClick += new ItemClickEventHandler(this.bbiRefresh_ItemClick);
            this.bbiClose.Caption = "Đ\x00f3ng";
            this.bbiClose.Id = 8;
            this.bbiClose.ImageIndex = 0x16;
            this.bbiClose.Name = "bbiClose";
            this.bbiClose.ItemClick += new ItemClickEventHandler(this.bbiClose_ItemClick);
            this.imageCollection2.ImageStream = (ImageCollectionStreamer) manager.GetObject("imageCollection2.ImageStream");
            this.imageCollection2.Images.SetKeyName(0x3d, "Vista (35).ico");
            this.imageCollection2.Images.SetKeyName(0x3e, "Security.ico");
            this.imageCollection2.Images.SetKeyName(0x3f, "RibbonPrintPreview_DocumentMapLarge.png");
            this.imageCollection2.Images.SetKeyName(0x40, "11.png");
            this.imageCollection2.Images.SetKeyName(0x41, "Sua.png");
            this.imageCollection2.Images.SetKeyName(0x42, "Them.png");
            this.imageCollection2.Images.SetKeyName(0x43, "PhanQuyen.png");
            this.imageCollection2.Images.SetKeyName(0x44, "11.png");
            this.imageCollection2.Images.SetKeyName(0x45, "plus.png");
            this.repMonth.AutoHeight = false;
            this.repMonth.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.repMonth.Mask.EditMask = "MM";
            this.repMonth.Name = "repMonth";
            this.repYear.AutoHeight = false;
            this.repYear.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.repYear.Mask.EditMask = "yyyy";
            this.repYear.Name = "repYear";
            this.imgList.ImageStream = (ImageCollectionStreamer) manager.GetObject("imgList.ImageStream");
            this.imgList.Images.SetKeyName(0, "male.png");
            this.imgList.Images.SetKeyName(1, "user_woman.png");
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.gcList);
            base.Controls.Add(this.barDockControlLeft);
            base.Controls.Add(this.barDockControlRight);
            base.Controls.Add(this.barDockControlBottom);
            base.Controls.Add(this.barDockControlTop);
            base.Name = "xucListDiscipline";
            base.Size = new Size(0x4ab, 0x26f);
            this.gcList.EndInit();
            this.gbList.EndInit();
            this.rptPhoto.EndInit();
            this.barManager1.EndInit();
            this.repositoryItemImageComboBox1.EndInit();
            this.repBeginDate.VistaTimeProperties.EndInit();
            this.repBeginDate.EndInit();
            this.repEndDate.VistaTimeProperties.EndInit();
            this.repEndDate.EndInit();
            this.imageCollection2.EndInit();
            this.repMonth.EndInit();
            this.repYear.EndInit();
            this.imgList.EndInit();
            base.ResumeLayout(false);
        }

        private void LoadGrid()
        {
            HRM_PROCESS_DISCIPLINE hrm_process_discipline = new HRM_PROCESS_DISCIPLINE();
            if (this.m_IndexKey == 0)
            {
                this.gcList.DataSource = hrm_process_discipline.GetAllList();
            }
            else
            {
                this.gcList.DataSource = hrm_process_discipline.GetAllListByDays(System.DateTime.Parse(this.bbeBeginDate.EditValue.ToString()), System.DateTime.Parse(this.bbeEndDate.EditValue.ToString()));
            }
        }

        private void RaiseClosedHander()
        {
            if (this.Closed != null)
            {
                this.Closed(this);
            }
        }

        private void ReLoad()
        {
            base.SetWaitDialogCaption("Đang nạp dữ liệu...");
            this.bbiFilter.EditValue = this.m_IndexKey;
            this.bbiFilter.EditValueChanged += new EventHandler(this.bbiFilter_EditValueChanged);
            this.bbeBeginDate.EditValueChanged += (s, e) => this.LoadGrid();
            this.bbeEndDate.EditValueChanged += (s, e) => this.LoadGrid();
            this.LoadGrid();
        }

        private void SetMenu(Common.Class.RowClickEventArgs e)
        {
            object rowCellValue = this.gbList.GetRowCellValue(this.gbList.FocusedRowHandle, "DisciplineID");
            this.DisableMenu(false);
            if (rowCellValue == null)
            {
                this.DisableMenu(true);
            }
        }

        private void ucList_ListKeyDown(object sender, KeyEventArgs key)
        {
            if (key.KeyCode == Keys.F2)
            {
                if (this.gbList.RowCount != 0)
                {
                    this.Change();
                }
            }
            else if ((key.KeyCode == Keys.Control) | (key.KeyCode == Keys.E))
            {
                if (this.gbList.RowCount != 0)
                {
                    this.Change();
                }
            }
            else if (key.KeyCode == Keys.Enter)
            {
                if (this.gbList.RowCount != 0)
                {
                    this.Change();
                }
            }
            else if (key.KeyCode == Keys.F5)
            {
                this.ReLoad();
            }
            else if ((key.KeyCode == Keys.Control) | (key.KeyCode == Keys.N))
            {
                this.Add();
            }
            else if ((key.KeyCode == Keys.Control) | (key.KeyCode == Keys.T))
            {
                this.Add();
            }
        }

        private void UpdateRow(HRM_PROCESS_DISCIPLINE item)
        {
            GridView gbList = this.gbList;
            int focusedRowHandle = this.gbList.FocusedRowHandle;
            gbList.SetRowCellValue(focusedRowHandle, "DisciplineID", item.DisciplineID);
            gbList.SetRowCellValue(focusedRowHandle, "EmployeeCode", item.EmployeeCode);
            HRM_EMPLOYEE hrm_employee = new HRM_EMPLOYEE();
            hrm_employee.Get(item.EmployeeCode);
            gbList.SetRowCellValue(focusedRowHandle, "DepartmentName", hrm_employee.DepartmentName);
            gbList.SetRowCellValue(focusedRowHandle, "GroupName", hrm_employee.GroupName);
            gbList.SetRowCellValue(focusedRowHandle, "FirstName", hrm_employee.FirstName);
            gbList.SetRowCellValue(focusedRowHandle, "LastName", hrm_employee.LastName);
            gbList.SetRowCellValue(focusedRowHandle, "DisciplineName", item.DisciplineName);
            gbList.SetRowCellValue(focusedRowHandle, "DateOccured", item.DateOccurred);
            gbList.SetRowCellValue(focusedRowHandle, "Location", item.Location);
            gbList.SetRowCellValue(focusedRowHandle, "Description", item.Description);
            gbList.SetRowCellValue(focusedRowHandle, "Witnesses", item.Witnesses);
            gbList.SetRowCellValue(focusedRowHandle, "Form", item.Form);
            gbList.SetRowCellValue(focusedRowHandle, "Date", item.Date);
            gbList.SetRowCellValue(focusedRowHandle, "Person", item.Person);
            gbList.UpdateCurrentRow();
        }

        public delegate void ClosedHander(object sender);
    }
}

